<?php
declare (strict_types = 1);

namespace app\admin\request;

use app\BaseRequest;

class LoginRequest extends BaseRequest
{
    protected $rule = [
        'login_name'    =>'require',
        'password'      =>'require',
        'code'          =>'require',
        'type'          =>'require',
        'token'         => 'require',
    ];

    protected $message = [
        'login_name.require'    =>'登录名必须',
        'password.require'      =>'密码必须',
        'code.require'          =>'验证码必须',
        'type.require'          =>'类型必须',
        'token.require'         =>'token必须',
    ];

    protected $scene = [
        'check' => ['login_name','type'],
        'data'  => ['login_name','password','code','type'],
        'cache' => ['token'],
    ];
}
